@mixin flex($direction:column,$items:stretch,$justify:space-between){
    display: flex;
    flex-direction: $direction;
    align-items: $items;
    justify-content: $justify;
}

@mixin modalCenter($width:600px,$top:50%,$bottom:auto,$translateY: -50%) {
    width: $width;
    position: absolute;
    top: $top;
    left: 50%;
    bottom: $bottom;
    transform: translate(-50% ,#{$translateY});
}

@mixin modulePosition($moduleTop:0px,$moduleLeft:0px,$moduleBottom:0px,$moduleRight:0px,$zIndex:3) {
    position: absolute;
    top: $moduleTop;
    left: $moduleLeft;
    bottom: $moduleBottom;
    right: $moduleRight;
    z-index: $zIndex;
}

$modalBgColor:white;
$panelHeaderFontSize:16px;
$headerOrLiHeight: 44px;
$buttonHeight: 26px;

.error{
    color: red;
    margin-left: 148px;
}

.checkbox {
    margin-top: 0px;
    margin-bottom: 0px;
}

div, h2, form, button {
    margin: 0px;
    padding: 0px;
}

#content {
    top: 60px;
}

.panel_header {
    height: 44px;
    line-height: 44px;
    background: -webkit-linear-gradient(top, #f3f3f3, #eeeeee);
    background: -moz-linear-gradient(top, #f3f3f3, #eeeeee);
    background: linear-gradient(top, #f3f3f3, #eeeeee);
    border-bottom: 1px solid #3b4756;
    text-align: center;
    font-size: $panelHeaderFontSize;
}

.panel_body {
    flex-grow: 1;
    -webkit-flex-grow: 1;
    overflow-y: auto;
    background-color: $modalBgColor;
}

.panel_footer {
    height: 36px;
    line-height: 36px;
    background: -webkit-linear-gradient(top, #f3f3f3, #eeeeee);
    background: -moz-linear-gradient(top, #f3f3f3, #eeeeee);
    background: linear-gradient(top, #f3f3f3, #eeeeee);
    border-top: 1px solid #3b4756;
    position: absolute;
    width: 100%;
    bottom: 0px;
}

.input-group {
    @include flex(row,flex-start);
}

.panel_header{
    .button-group {
        position: absolute;
        left: 10px;
        top: 0px;
    }

    button {
        height: $buttonHeight;
        line-height: $buttonHeight;
        padding-top: 0px;
        padding-bottom: 0px;
    }

    h2 {
        font-size: $panelHeaderFontSize;
        font-weight: normal;
        line-height: $headerOrLiHeight;
    }

    .form-inline {
        position: absolute;
        right: 10px;
        top: 0px;

        .input-group {
            left: 10px;

            input {
                height: 28px;
                line-height: 28px;
                width: 300px;
            }
        }

        button {
            height: 28.125px;
            position: relative;
            top: -0.5px;
        }
    }
}

.panel_title {
    padding: 0px;
    line-height: $headerOrLiHeight;
    border-bottom: 1px solid #dddddd;
    color: #777777;
}

.list {
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0 -15px;
    height: 740px;

    .list-item {
        height: $headerOrLiHeight;
        line-height: $headerOrLiHeight;
        border-bottom: 1px solid #dddddd;
        padding-left: 15px;

        div:last-child {
            padding-left: 5px;
        }

        &:last-child {
            border-bottom: none;
        }

        &:hover {
            background-color: #ececec;
        }

        &:last-child:hover {
            background-color: transparent;
        }
    }
}

.nomore {
    text-align: center;
    line-height: 2.5;
    font-size: 12px;
    color: #ADB7C3;
}

.panel_footer p {
    margin: 0px;
    padding: 0px;
    margin-left: 10px;
    color: #ADB7C3;
    font-size: 12px;
}

.aside-slider-content {
    width: 400px;
    @include modulePosition($moduleRight:-400px,$moduleLeft:auto);
    background-color: $modalBgColor;
    box-shadow: -2px 0 4px #3b4756;
    transition: right 0.5s ease-in-out;

    .panel_header {
        padding-left: 10px
    }
}

.cancel {
    cursor: pointer;
}

.panel_header span.cancel {
    float: right;
    line-height: $headerOrLiHeight;
    display: inline-block;
    margin-right: 10px;
}

.aside-slider-content .list-group .list-group-item {
    line-height: $headerOrLiHeight;
    padding-top: 0px;
    padding-bottom: 0px;
    @include flex(row, flex-start, flex-start);
    .item-title {
        width: 120px;
        min-width: 120px;
        padding-left: 10px;
    }
}

.aside-slider-content {
    .panel_footer{
        button {
            height: $buttonHeight;
            line-height: $buttonHeight;
            padding-top: 0px;
            padding-bottom: 0px;
            margin-bottom: 5px;
        }
    }
}

.masking {
    display: none;
    background-color: #000000;
    @include modulePosition();
    opacity: 0.8;
}

.container-delete-region.modal-small {
    @include flex();
    height: 260px;
    background-color: $modalBgColor;
    @include modalCenter();
    z-index: 3;
    display: none;

    .panel_header {
        font-size: $panelHeaderFontSize;
    }
}

.modal-small .panel_body {
    @include flex(row,$justify:flex-start);

    .iconfont {
        flex-grow: 2;
        font-size: 56px;
        align-self: center;
        justify-content: flex-end;
        color: #fcad3a;
        padding-right: 30px;
    }

    p:last-child {
        flex-grow: 3;
    }
}

.container-delete-region .panel_footer {
    @include flex(row, flex-end, flex-end);
    position: relative;
}

.container-delete-region .panel_footer button {
    margin: 0 5px;
    padding:0 10px;
    margin-bottom: 4px;
    height: $buttonHeight;
    line-height: $buttonHeight;
}

.container-delete-region .panel_body p {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-top: 15px;
    line-height: 30px;
}

.container-region-new.modal-big {
    @include flex();
    @include modalCenter($top: 50%,$bottom:auto,$width:800px,$translateY:-50%);
    -webkit-transform: translate(-50%,-50%);
    z-index: 3;
    height: 600px;

    .panel_body {
        padding: 15px;
        position: relative;

        .body {
            position: relative;
            .list-group-item {
                border: none;
                padding: 0px;
                line-height: $headerOrLiHeight;
            }
        }
        
        #map {
            width: 492px;
            height: 332px;
            margin-left: 172px;
        }
    }

    .panel_footer{
        padding-right: 10px;
        position: relative;

        button {
            height: $buttonHeight;
            line-height: $buttonHeight;
            padding: 0 12px;
        }
    }

    display: none;
}

.container-region-new .body {
    label {
        width: 120px;
        white-space: normal;
        font-weight: normal;
        line-height: 28px;
        flex-grow: 1;
    }

    input {
        width: 420px;
        height: 28px;
        line-height: 28px;
        margin-right: 192px;
    }
}

